﻿-- =============================================  
-- Author:  <Author,,Name>  
-- Create date: <Create Date,,>  
-- Description: <Description,,>  
--exec [GetMenu] ''  
-- =============================================  
alter PROCEDURE [dbo].[GetMenu]  
 @Url varchar(150)  
AS  
BEGIN  
   
 DECLARE @LogoId INT;    
  
 SELECT TOP 1 @LogoId = li.id       
 FROM LogoInformation li       
 WHERE       
  li.Url= case when @Url = '' then li.Url else ISNULL(@Url,li.Url) end  
  AND (li.isDeleted is null OR li.isDeleted = 0 )      
  AND IsActive = 1  
 ORDER BY ID DESC    
  
select * from tblLookup t  
where LookUpCode = 'Menu'  
and LookUpID in (  
 select MenuId from LogoDetail ld   
 inner join LogoInformation li  
 on li.Id = ld.LogoInformationId and li.Id=@LogoId  

)  
  
--select * from LogoInformation  
  
END  
  
  
CREATE PROCEDURE CheckDate
	@CurrentDate datetime
AS
BEGIN
delete from LogoInformation  l
where l.CurrentDate >=@CurrentDate END
GO
